package com.example.pet.controller;

import com.example.pet.service.UserService;
import com.hj.pet.model.ReturnT;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@CrossOrigin
@RequestMapping("/user")
public class UserController {
    @Autowired
    UserService service;

    @RequestMapping(value = "login" ,method = RequestMethod.POST)
    @ResponseBody
    public ReturnT<?> login(@RequestParam String userAccount, @RequestParam String userPwd) {
        return service.login(userAccount,userPwd);
    }

    @RequestMapping(value = "registry", method = RequestMethod.POST)
    @ResponseBody
    public boolean registry(@RequestParam String userAccount ,String userPwd){
        return service.registry(userAccount,userPwd);
    }


}
